package com.gaomall.seckill.controller;

import com.gaomall.seckill.domain.Users;
import com.gaomall.seckill.service.IUserService;
import com.gaomall.seckill.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
@ResponseBody
public class LoginController {

//    @Autowired
//    private UserService userService;

    @RequestMapping("/login")
    public String login(){
        return "login";
    }

//    @RequestMapping(value = "/telphone-login", method = RequestMethod.POST)
//    public ResultVO<Users> cellphoneLogin(String telphone, String password){
//
//        ResultVO<Users> response = userService.login(telphone,password);
////        if(response.isSuccess()){
////            session.setAttribute(Const.CURRENT_USER,response.getData());
////        }
//        return response;
//    }

    @RequestMapping("/qq-login")
    public String qqLogin(){
        return "qqLogin";
    }

    @RequestMapping("/wechat-login")
    public String wechatLogin(){
        return "wechatLogin";
    }

}
